<header class="header" id="main-navbar">
    <div  class="row-fluid" style="position: relative">
        <div class="nav-black">
            <div class="row-fluid">
                <div class="span2">
                    <img  class="logoAnunciomin"  src="<?php echo Yii::app()->theme->baseUrl ?>/images/logo/logo.png">
                </div>
                <div class="span5">
                    <form class="navbar-search" action="" _lpchecked="1">
                        <div class="">
                            <input type="text" class="search-query" placeholder="Buscar" > <span class="icon-search iconSearchFlare"> </span>
                        </div>
                    </form>
                </div>
                <div class="span5">
                    <ul class="nav pull-right"  <ul class="nav pull-right" id="flareCabeceraCuentas">
                            <?php if (!Yii::app()->user->isGuest): ?>
                                <li>
                                    <ul class="messages">
                                        <li>
                                            <a href="#"><i class="icon-warning-sign"></i> X<span class="responsive-text"> alerts</span></a>
                                        </li>
                                        <li>
                                            <a href="#"><i class="icon-envelope"></i> X<span class="responsive-text"> new messages</span></a>
                                        </li>
                                    </ul>
                                </li>
                            <?php else: ?>
                                <li>
                                    <span class="colorFlareReg"> 
                                        <?php
                                        if (Yii::app()->user->um->getDefaultSystem()->getn('registrationonlogin') === 1) {
                                            echo Yii::app()->user->ui->registrationLink;
                                        }
                                        ?>
                                    </span>
                                </li>
                            <?php endif; ?>
                            <li class="separator"></li>
                            <li>
                                <div class="btn-group">
                                    <button  id="btnAdminCuentaFlare" class="btn  btn-inverse dropdown-toggle " data-toggle="dropdown">
                                        <?php echo (!Yii::app()->user->isGuest) ? Yii::app()->user->name : " Tu Cuenta" ?>
                                        <span class="caret"> </span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <?php if (!Yii::app()->user->isGuest): ?>
                                            <?php $contacto = ContactosCrugeUser::model()->de_cruge_user()->findAll(); ?>
                                            <li><?php
                                                echo (!empty($contacto)) ? CHtml::link('<i class="icon-user"></i>&nbsp;&nbsp; Mi cuenta', array('/cuentas/contactos/view/id/' . $contacto[0]['oldValues']['contacto_id'])) :
                                                        CHtml::link('<i class="icon-user"></i>&nbsp;&nbsp; Mi cuenta', array('/cuentas/contactos/create'))
                                                ?></li>
                                            <?php if (Yii::app()->user->checkAccess("admin")): ?>
                                                <li><?php echo CHtml::link('<i class="icon-cog"></i>&nbsp;&nbsp; Administracion', Yii::app()->user->ui->userManagementAdminUrl) ?></li>
                                            <?php endif; ?>
                                            <li><?php echo CHtml::link('<i class="icon-key"></i>&nbsp;&nbsp; Cerrar sesion', Yii::app()->user->ui->logoutUrl) ?></li>
                                        <?php else: ?>
                                            <li><?php echo CHtml::link('<i class="icon-key"></i>&nbsp;&nbsp; Iniciar sesion', Yii::app()->user->ui->loginUrl) ?></li>
                                        <?php endif; ?>
                                    </ul>
                                </div>  
                            </li>
                        </ul>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span9">
                <div class="nav-white fontTitleFlare">
                    <!--<div class="container">-->
                    <div id="navCategorias" class="">
                        <div class="nav-collapse nav-collapse_ collapse">
                            <button id="menu_button"><i class="fa fa-align-justify"></i></button>
                            <ul class="nav sf-menu row-fluid">
                                <li class="sub-menu span3"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/cel.png">Telefonia y Electronica     |</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class=" pull-left">
                                                <h6>Main Pages</h6>
                                                <a href="page_about.html">About us</a>
                                                <a href="page_services.html">Services</a>
                                                <a href="page_full_width.html">Full width page</a>
                                                <a href="page_team.html">Team</a>                   
                                                <a href="page_with_right_sidebar.html">Page with right sidebar</a> 
                                                <a href="page_process.html">Process page</a> 
                                                <a href="page_careers.html">Careers</a>
                                                <a href="page_with_left_sidebar.html">Page with left sidebar</a>
                                            </div>
                                            <div class=" pull-right">
                                                <h6>Special Pages</h6>
                                                <a href="page_faq.html">FAQ page</a> 
                                                <a href="page_coming_soon.html">Coming soon</a>
                                                <a href="page_404.html">404 page</a>
                                                <a href="page_landing.html">Landing page</a>
                                                <a href="page_sitemap.html">Sitemap</a>
                                                <a href="page_side_navigation.html">Side navigation</a> 
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <li class="sub-menu span2"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/audio-y-video.png">Audio  y Video     |</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class="pull-left">
                                                <h6>Main Pages</h6>
                                            </div>
                                            <div class="pull-rigth">
                                                <h6>Special Pages</h6>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <li class="sub-menu span2"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/hogar.png">Hogar y Oficina     |</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class="pull-left">
                                                <h6>Main Pages</h6>
                                            </div>
                                            <div class="pull-rigth">
                                                <h6>Special Pages</h6>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <li class="sub-menu span2"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/computacion.png">Computación     |</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class="pull-left">
                                                <h6>Main Pages</h6>
                                            </div>
                                            <div class="pull-rigth">
                                                <h6>Special Pages</h6>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <li class="sub-menu span3"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/consolas.png">Consolas y VideoJuegos     |</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class="pull-left">
                                                <h6>Main Pages</h6>
                                            </div>
                                            <div class="pull-rigth">
                                                <h6>Special Pages</h6>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                                <li class="sub-menu span2"><a href="javascript:;"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/clasificados.png">Clasificados</a>
                                    <ul class="submenu-extra">
                                        <li>
                                            <div class="pull-left">
                                                <h6>Bolsa de empleos</h6>
                                                <!--TODO contiene servicios y otros -->
                                            </div>
                                            <div class="pull-rigth">
                                                <h6>Special Pages</h6>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <!--</div>-->
                </div>
            </div>  
            <div class="span3">
                <div class="nav-white fontTitleFlare">
                    <!--<div class="container">-->
                    <div id="navCategorias" class="offset1">
                        <div class="nav-collapse nav-collapse_ collapse">
                            <button id="menu_button"><i class="fa fa-align-justify"></i></button>
                            <ul class="nav sf-menu row-fluid">
                                <li class="sub-menu"><a href=""><img src="/anuncios-jl/themes/flare/images/iconAnuncios/comprar.png">Comprar |</a>
                                </li>
                                <li class="sub-menu"><a href="<?php echo Yii::app()->baseUrl ?>/index.php/inventario/kardexVenta/goToSale"><img src="/anuncios-jl/themes/flare/images/iconAnuncios/vender.png">Vender</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <!--</div>-->
                </div>
            </div>
        </div>  
    </div>



</header>


<!-- / Main navigation bar -->